import request from "@/utils/request";

// 获取飞行计划申请列表
export function getFlyapplyListApi(query, data = {}) {
  return request({
    url: '/flight/flyapply/list',
    method: 'post',
    params: query,
    data
  })
}

// 查询飞行计划申请详情
export function getFlyapplyDetailApi(flyapplyId) {
  return request({
    url: `/flight/flyapply/${flyapplyId}`,
    method: 'get',
  })
}

// 新增飞行计划申请
export function saveFlyapplyApi(query) {
  return request({
    url: '/flight/flyapply',
    method: 'post',
    data: query
  })
}

// 修改飞行计划申请
export function editFlyapplyApi(query) {
  return request({
    url: '/flight/flyapply',
    method: 'put',
    data: query
  })
}

// 审批飞行计划申请
export function approvalFlyapplyApi(query) {
  return request({
    url: '/flight/flyapply/approval',
    method: 'post',
    data: query
  })
}

// 删除飞行计划申请
export function deleteFlyapplyApi(flyapplyId) {
  return request({
    url: `/flight/flyapply/${flyapplyId}`,
    method: 'delete',
  })
}